Skip to content

fix(rust): Check crates.io instead of git tags for version release status#30

Merged
konard merged 3 commits intomainfrom
issue-29-ce573bdf1462
Jan 18, 2026
Merged

fix(rust): Check crates.io instead of git tags for version release status#30
konard merged 3 commits intomainfrom
issue-29-ce573bdf1462

Conversation

@konard
Copy link
Member

@konard konard commented Jan 17, 2026

Summary

This PR fixes a false positive in the release workflow where versions were incorrectly marked as "already released" when they were never published to crates.io.

Problem

The release workflow checked if a git tag exists to determine if a version was already released:

if git rev-parse "v$CURRENT_VERSION" >/dev/null 2>&1; then
    echo "... already released"
fi

This caused false positives because:

  1. Git tags can exist without the package being published to crates.io
  2. GitHub releases create tags but don't publish to crates.io
  3. The package browser-commander has 10 GitHub releases (v0.1.1 - v0.5.4) but NONE on crates.io

Solution

Changed the version check to query crates.io API directly:

CRATES_IO_RESPONSE=$(curl -s "https://crates.io/api/v1/crates/${CRATE_NAME}/${CURRENT_VERSION}")
if echo "$CRATES_IO_RESPONSE" | grep -q '"version"'; then
    VERSION_ON_CRATES_IO=true
fi

This ensures we only skip releases when the version is actually published on crates.io.

Changes

  • .github/workflows/rust.yml: Updated version check logic to query crates.io API
  • docs/case-studies/issue-29/: Added comprehensive case study documentation including:
    • Timeline of events
    • Root cause analysis
    • CI run logs and metadata (from run #21092316062)
    • Proposed solutions

Test Plan

  • Tested crates.io API locally - correctly returns "not found" for browser-commander
  • Tested crates.io API with existing crate (serde) - correctly detects published versions
  • Verified grep patterns correctly extract crate name and version from Cargo.toml

References


Fixes #29

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #29
@konard konard self-assigned this Jan 17, 2026
…atus

The release workflow incorrectly determined that versions were "already released"
by checking if a git tag exists. This caused false positives because git tags
can exist without the package being published to crates.io.

Changes:
- Check crates.io API to verify if version is actually published
- Add verbose logging for debugging (crate name, version, publish status)
- Use head -1 to extract only package name/version (not lib/bin names)

Also adds case study documentation for issue #29 with:
- Timeline of events
- Root cause analysis
- CI logs and metadata

Fixes #29

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Release failed, because version check got false positive fix(rust): Check crates.io instead of git tags for version release status Jan 17, 2026
@konard konard marked this pull request as ready for review January 17, 2026 23:21
@konard
Copy link
Member Author

konard commented Jan 17, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.293470 USD
  • Calculated by Anthropic: $2.257031 USD
  • Difference: $-1.036439 (-31.47%)
    📎 Log file uploaded as Gist (843KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release failed, because version check got false positive

1 participant